package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

/**
 * 类功能描述(类上)
 *
 * @author AnBetter
 * @since 2021-04-16
 */
public class MainAppWebResponseContext implements Sequenceable, Serializable  {

    @SerializedName("loggedOut")
    private boolean isLoggedOut;

    public static final Sequenceable.Producer<MainAppWebResponseContext> CREATOR = new Producer<MainAppWebResponseContext>() {
        @Override
        public MainAppWebResponseContext createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            MainAppWebResponseContext mainAppWebResponseContext = new MainAppWebResponseContext();
            mainAppWebResponseContext.unmarshalling(parcel);
            return mainAppWebResponseContext;
        }
    };

    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeBoolean(this.isLoggedOut);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.isLoggedOut = parcel.readBoolean();
        return true;
    }

    @Override
    public String toString() {
        return "MainAppWebResponseContext{" +
                "loggedOut = '" + isLoggedOut + '\'' +
                "}";
    }

    public boolean isLoggedOut() {
        return isLoggedOut;
    }

    public void setLoggedOut(boolean loggedOut) {
        isLoggedOut = loggedOut;
    }
}
